package com.atguigu.jxc.dao;

import com.atguigu.jxc.entity.CustomerReturnListGoods;
import com.atguigu.jxc.entity.SaleCount;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;

@Mapper
@Component
public interface CustomerReturnListGoodsDao {
    /**
     * 退货单商品信息
     * @param customerReturnListId
     * @return
     */
    List<CustomerReturnListGoods> getGoodsByListId(Integer customerReturnListId);

    /**
     * 删除退货单中的商品
     * @param customerReturnListId
     */
    void deleteByListId(Integer customerReturnListId);

    /**
     * 客户退货统计
     *
     * @param start
     * @param end
     * @param goodsTypeId
     * @param codeOrName
     * @return
     */
    List<SaleCount> selectCount(Date start, Date end, Integer goodsTypeId, String codeOrName);

}
